feat: Document how to use the HTTP client override parameter#530
feat: Document how to use the HTTP client override parameter#530marcelomendoncasoares wants to merge 1 commit into
Conversation
bb01207 to
639abc8
Compare
639abc8 to
ca3cfa9
Compare
There was a problem hiding this comment.
The difference between "Calling endpoints" and "Working with endpoints" is ambiguous to a user. Working with endpoints should contain the basic use cases, and calling endpoints is about configuring the request to the server.
Suggested renaming "Configure HTTP calls".
Note: Use the active voice when possible (i.e., Configure, rather than Configuration)
| ..connectivityMonitor = FlutterConnectivityMonitor(); | ||
| ``` | ||
|
|
||
| ## Connecting from a different device |
There was a problem hiding this comment.
If we rename it to "Configure HTTP calls", this should move back to "Working with endpoints". It's a basic use case users will run into.
| @@ -0,0 +1,134 @@ | |||
| # Calling endpoints | |||
|
|
|||
| When you run `serverpod generate` after defining endpoints on your server, Serverpod creates a `Client` class in your client package with typed methods for each endpoint. This `client` is used to call the endpoints on the server as if they were local methods. | |||
There was a problem hiding this comment.
With the renaming, we can remove "Initializing the client" from here, which is a duplication from "Working with endpoints". We rewrite the introduction to explain why overriding the HTTP client is necessary to configure the HTTP calls.
| ``` | ||
|
|
||
| :::info | ||
| Note that, if you use the [`httpClientOverride` parameter](./working-with-endpoints/calling-endpoints#http-client-override), you need to provide the security context through the client being passed to `httpClientOverride`. You cannot set `securityContext` and `httpClientOverride` on the same client. |
There was a problem hiding this comment.
I am missing a code example showcasing this. Change this from an info note to a section covering this, with a heading and a code example.
Documentation for serverpod/serverpod#5134.